home *** CD-ROM | disk | FTP | other *** search
-
-
-
- QQQQBBBBuuuuffffffffeeeerrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuffffffffeeeerrrr((((3333qqqqtttt))))
-
-
-
- NNNNAAAAMMMMEEEE
- QBuffer - I/O device that operates on a QByteArray
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- #include <qbuffer.h>
-
- Inherits QIODevice.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
- QQQQBBBBuuuuffffffffeeeerrrr (((())))
- QQQQBBBBuuuuffffffffeeeerrrr (((( QQQQBBBByyyytttteeeeAAAArrrrrrrraaaayyyy ))))
- ~~~~QQQQBBBBuuuuffffffffeeeerrrr ()
- QQQQBBBByyyytttteeeeAAAArrrrrrrraaaayyyy bbbbuuuuffffffffeeeerrrr (((()))) ccccoooonnnnsssstttt
- bbbboooooooollll sssseeeettttBBBBuuuuffffffffeeeerrrr (((( QQQQBBBByyyytttteeeeAAAArrrrrrrraaaayyyy ))))
- vvvviiiirrrrttttuuuuaaaallll bbbboooooooollll ooooppppeeeennnn (((( iiiinnnntttt ))))
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd cccclllloooosssseeee (((())))
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd fffflllluuuusssshhhh (((())))
- vvvviiiirrrrttttuuuuaaaallll uuuuiiiinnnntttt ssssiiiizzzzeeee (((()))) ccccoooonnnnsssstttt
- vvvviiiirrrrttttuuuuaaaallll iiiinnnntttt aaaatttt (((()))) ccccoooonnnnsssstttt
- vvvviiiirrrrttttuuuuaaaallll bbbboooooooollll aaaatttt (((( iiiinnnntttt ))))
- vvvviiiirrrrttttuuuuaaaallll iiiinnnntttt rrrreeeeaaaaddddBBBBlllloooocccckkkk (((( cccchhhhaaaarrrr **** _p,,,, uuuuiiiinnnntttt ))))
- vvvviiiirrrrttttuuuuaaaallll iiiinnnntttt wwwwrrrriiiitttteeeeBBBBlllloooocccckkkk (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _p,,,, uuuuiiiinnnntttt ))))
- vvvviiiirrrrttttuuuuaaaallll iiiinnnntttt rrrreeeeaaaaddddLLLLiiiinnnneeee (((( cccchhhhaaaarrrr **** _p,,,, uuuuiiiinnnntttt ))))
- vvvviiiirrrrttttuuuuaaaallll iiiinnnntttt ggggeeeettttcccchhhh (((())))
- vvvviiiirrrrttttuuuuaaaallll iiiinnnntttt ppppuuuuttttcccchhhh (((( iiiinnnntttt ))))
- vvvviiiirrrrttttuuuuaaaallll iiiinnnntttt uuuunnnnggggeeeettttcccchhhh (((( iiiinnnntttt ))))
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The QBuffer class is an I/O device that operates on a
- QByteArray
-
- QBuffer is an I/O device for reading and writing a memory
- buffer. A QBuffer may be used directly (readBlock() and
- writeBlock()) or more conveniently via QDataStream or
- QTextStream. Most of its behavior is inherited from
- QIODevice.
-
- A QBuffer has an associated QByteArray which holds the
- buffer data. Writing data at the end (i.e. size()) of the
- buffer expands the byte array.
-
- For convenience, the byte stream classes QDataStream and
- QTextStream can operate on a QByteArray (or a QString) via
- an internal QBuffer:
-
- QString str;
- QTextStream ts( str, IO_WriteOnly );
- ts << "pi = " << 3.14; // str == "pi = 3.14"
-
- See also: QFile, QDataStream and QTextStream.
-
- Examples: grapher/grapher.cpp
-
-
-
- Page 1 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuffffffffeeeerrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuffffffffeeeerrrr((((3333qqqqtttt))))
-
-
-
- MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
- QQQQBBBBuuuuffffffffeeeerrrr::::::::QQQQBBBBuuuuffffffffeeeerrrr (((())))
- Constructs an empty buffer.
-
- QQQQBBBBuuuuffffffffeeeerrrr::::::::QQQQBBBBuuuuffffffffeeeerrrr (((( QQQQBBBByyyytttteeeeAAAArrrrrrrraaaayyyy bbbbuuuuffff ))))
- Constructs a buffer and sets the buffer contents to _b_u_f.
-
- See also: setBuffer().
-
- QQQQBBBBuuuuffffffffeeeerrrr::::::::~~~~QQQQBBBBuuuuffffffffeeeerrrr (((())))
- Destroys the buffer.
-
- bbbboooooooollll QQQQBBBBuuuuffffffffeeeerrrr::::::::aaaatttt (((( iiiinnnntttt ppppoooossss )))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Sets the buffer index to _p_o_s. Returns TRUE if successful,
- otherwise FALSE.
-
- See also: size().
-
- Reimplemented from QIODevice.
-
- iiiinnnntttt QQQQBBBBuuuuffffffffeeeerrrr::::::::aaaatttt (((()))) ccccoooonnnnsssstttt [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Returns the buffer index.
-
- See also: size().
-
- Reimplemented from QIODevice.
-
- QQQQBBBByyyytttteeeeAAAArrrrrrrraaaayyyy QQQQBBBBuuuuffffffffeeeerrrr::::::::bbbbuuuuffffffffeeeerrrr (((()))) ccccoooonnnnsssstttt
- Returns the buffer most recently set by setBuffer(), or at
- construction.
-
- vvvvooooiiiidddd QQQQBBBBuuuuffffffffeeeerrrr::::::::cccclllloooosssseeee (((()))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Closes an open buffer.
-
- See also: open().
-
- Examples: grapher/grapher.cpp
-
- Reimplemented from QIODevice.
-
- vvvvooooiiiidddd QQQQBBBBuuuuffffffffeeeerrrr::::::::fffflllluuuusssshhhh (((()))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- The flush function does nothing.
-
- Reimplemented from QIODevice.
-
- iiiinnnntttt QQQQBBBBuuuuffffffffeeeerrrr::::::::ggggeeeettttcccchhhh (((()))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Reads a single byte/character from the buffer.
-
- Returns the byte/character read, or -1 if the end of the
- buffer has been reached.
-
- See also: putch() and ungetch().
-
-
-
- Page 2 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuffffffffeeeerrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuffffffffeeeerrrr((((3333qqqqtttt))))
-
-
-
- Reimplemented from QIODevice.
-
- bbbboooooooollll QQQQBBBBuuuuffffffffeeeerrrr::::::::ooooppppeeeennnn (((( iiiinnnntttt mmmm )))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Opens the file specified by the file name currently set,
- using the mode _m. Returns TRUE if successful, otherwise
- FALSE.
-
- The mode parameter _m must be a combination of the following
- flags.
-
- IO_ReadOnly opens a buffer in read-only mode.
-
- IO_WriteOnly opens a buffer in write-only mode.
-
- IO_ReadWrite opens a buffer in read/write mode.
-
- IO_Append sets the buffer index to the end of the buffer.
-
- IO_Truncate truncates the buffer.
-
- See also: close() and isOpen().
-
- Examples: grapher/grapher.cpp
-
- Reimplemented from QIODevice.
-
- iiiinnnntttt QQQQBBBBuuuuffffffffeeeerrrr::::::::ppppuuuuttttcccchhhh (((( iiiinnnntttt cccchhhh )))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Writes the character _c_h into the buffer, overwriting the
- character at the current index, extending the buffer if
- necessary.
-
- Returns _c_h, or -1 if some error occurred.
-
- See also: getch() and ungetch().
-
- Examples: grapher/grapher.cpp
-
- Reimplemented from QIODevice.
-
- iiiinnnntttt QQQQBBBBuuuuffffffffeeeerrrr::::::::rrrreeeeaaaaddddBBBBlllloooocccckkkk (((( cccchhhhaaaarrrr **** pppp,,,, uuuuiiiinnnntttt lllleeeennnn )))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Reads at most _l_e_n bytes from the buffer into _p and returns
- the number of bytes actually read.
-
- Returns -1 if a serious error occurred.
-
- See also: writeBlock().
-
- Reimplemented from QIODevice.
-
- iiiinnnntttt QQQQBBBBuuuuffffffffeeeerrrr::::::::rrrreeeeaaaaddddLLLLiiiinnnneeee (((( cccchhhhaaaarrrr **** pppp,,,, uuuuiiiinnnntttt mmmmaaaaxxxxlllleeeennnn )))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Reads a line of text.
-
-
-
-
- Page 3 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuffffffffeeeerrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuffffffffeeeerrrr((((3333qqqqtttt))))
-
-
-
- Reads bytes from the buffer until end-of-line is reached, or
- up to _m_a_x_l_e_n bytes.
-
- See also: readBlock().
-
- Reimplemented from QIODevice.
-
- bbbboooooooollll QQQQBBBBuuuuffffffffeeeerrrr::::::::sssseeeettttBBBBuuuuffffffffeeeerrrr (((( QQQQBBBByyyytttteeeeAAAArrrrrrrraaaayyyy bbbbuuuuffff ))))
- Replaces the buffer's contents with _b_u_f.
-
- This may not be done while the buffer is open.
-
- Note that if you open the buffer in write mode (IO_WriteOnly
- or IO_ReadWrite) and write something into the buffer, _b_u_f is
- also modified because QByteArray is an explicitly shared
- class.
-
- Example:
-
- QString str = "abc";
- QBuffer b( str );
- b.open( IO_WriteOnly );
- b.at( 3 ); // position at \0
- b.writeBlock( "def", 4 ); // write including \0
- b.close();
- // Now, str == "abcdef"
-
- See also: open and Shared Classes
-
- uuuuiiiinnnntttt QQQQBBBBuuuuffffffffeeeerrrr::::::::ssssiiiizzzzeeee (((()))) ccccoooonnnnsssstttt [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Returns the number of bytes in the buffer.
-
- See also: at().
-
- Reimplemented from QIODevice.
-
- iiiinnnntttt QQQQBBBBuuuuffffffffeeeerrrr::::::::uuuunnnnggggeeeettttcccchhhh (((( iiiinnnntttt cccchhhh )))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Puts the character _c_h back into the buffer and decrements
- the index if it is not zero.
-
- This function is normally called to "undo" a getch()
- operation.
-
- Returns _c_h, or -1 if some error occurred.
-
- See also: getch() and putch().
-
- Reimplemented from QIODevice.
-
- iiiinnnntttt QQQQBBBBuuuuffffffffeeeerrrr::::::::wwwwrrrriiiitttteeeeBBBBlllloooocccckkkk (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** pppp,,,, uuuuiiiinnnntttt lllleeeennnn )))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Writes _l_e_n bytes from _p into the buffer at the current
- index, overwriting any characters there and extending the
-
-
-
- Page 4 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuffffffffeeeerrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuffffffffeeeerrrr((((3333qqqqtttt))))
-
-
-
- buffer if necessary. Returns the number of bytes actually
- written.
-
- Returns -1 if a serious error occurred.
-
- See also: readBlock().
-
- Reimplemented from QIODevice.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- hhhhttttttttpppp::::////////wwwwwwwwwwww....ttttrrrroooollllllll....nnnnoooo////qqqqtttt////qqqqbbbbuuuuffffffffeeeerrrr....hhhhttttmmmmllll
-
- CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
- Copyright 1992-1997 Troll Tech AS. See the LICENSE file
- included in the distribution for a complete license
- statement.
-
- AAAAUUUUTTTTHHHHOOOORRRR
- Generated automatically from the source code.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 5 (printed 9/22/98)
-
-
-
-